package GongSi;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        GongSI s=new GongSI();
        s.name="社会主义接班人";
        s.phone=110;
        s.scope="全球";
        s.site="中华人民共和国";
        while (true){
            Scanner in=new Scanner(System.in);
            System.out.println("请选择功能：");
            System.out.println("1.加入新员工，2.查看信息，3.辞退员工,4.涨薪水，5.薪水最高，0.退出");
            int a=in.nextInt();
            if (a==1){
                System.out.println("请输入姓名");
                String name=in.next();
                System.out.println("请输入工号");
                String gonghao=in.next();
                System.out.println("请输入性别");
                String sex=in.next();
                System.out.println("请输入职务");
                String zhiwu=in.next();
                System.out.println("请输入薪水");
                int xinshui=in.nextInt();
                System.out.println("请输入身份证号");
                String id=in.next();
                System.out.println("请输入工作年限");
                int gongzuo=in.nextInt();
                s.jiare(name,gonghao,sex,zhiwu,xinshui,id,gongzuo);
            }else if (a==2){
                s.yuangong();
            }else if (a==3){
                System.out.println("开除谁？");
                String Sname=in.next();
                boolean f=s.fire(Sname);
                System.out.println(f?"开除成功":"查无此人");
            }else if (a==4){
                System.out.println("给谁涨？");
                String m=in.next();
                boolean j= s.Salary(m);
                System.out.println(j?"涨薪成功":"大可不必");
            }
            if (a==0){
                break;
            }
        }
    }
}
